package com.ytc.mapper;

import com.ytc.model.Author;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 25645
* @description 针对表【my_author】的数据库操作Mapper
* @createDate 2023-01-08 11:48:18
* @Entity com.ytc.model.Author
*/
public interface AuthorMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Author record);

    int insertSelective(Author record);

//    Author selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Author record);

    int updateByPrimaryKey(Author record);

    List<Author> queryList();

    /*柴晓颖：新增作者*/
    void addAuthor(Author author);

    //柴晓颖：根据userid查作者id
    Long queryAuthoridByUserid(Integer uId);

    //张泽萌：通过uid查询作者
    Author queryAuthorByUid(@Param("uId") Integer uId);

}
